Skip to content

feat: inline event creation from timeline double-click#16

Merged
kibermaks merged 1 commit intomainfrom
kibermaks/timeline-event-create
Apr 9, 2026
Merged

feat: inline event creation from timeline double-click#16
kibermaks merged 1 commit intomainfrom
kibermaks/timeline-event-create

Conversation

@kibermaks
Copy link
Copy Markdown
Owner

Description

Add the ability to create calendar events directly from the timeline by double-clicking on free space in the left half. Features a Spotlight-like autocomplete popover with recent event suggestions, calendar name matching, live duration lookup from EventKit, and full undo/redo support.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Code refactoring
  • Performance improvement
  • Build/CI change

Related Issues

N/A

Changes Made

  • EventCreationPopover — new inline popover with calendar picker (CalendarPickerCompact), name field with Spotlight-like autocomplete (prefix > substring > fuzzy matching), duration quick-chips (30/45/60/90) + NumericInputField, and keyboard-driven flow (Cmd+Up/Down cycles calendars, arrow keys for suggestions, Tab/Enter to apply)
  • RecentEventsStore — new service that persists up to 20 recently created event templates in UserDefaults, with search (prefix/substring/fuzzy) and live duration resolution from EventKit via stored eventId
  • TimelineView — double-click on free space (left half) opens creation popover as a floating overlay (outside ScrollView to avoid clipping), with full undo/redo for created events (Cmd+Z deletes, Cmd+Shift+Z restores)
  • EventUndoManager — added .create case to UndoableChange enum with recordCreate(), pushRedoForUndoneCreate(), and updateTopUndoCreateId() for round-trip undo/redo with event ID tracking
  • CalendarService — added eventDurationMinutes(identifier:) for live duration lookup from EventKit
  • SessionFlowApp — registered RecentEventsStore as @EnvironmentObject
  • Last selected calendar persisted via @AppStorage across sessions
  • Unified Suggestion enum mixes recent events and calendar matches in one dropdown, with calendar icon to distinguish types

Screenshots/Videos

N/A

Testing Checklist

  • App builds without errors or warnings
  • All existing features still work
  • New feature works as expected
  • Tested with empty calendar
  • Tested with calendar containing events
  • Tested edge cases (if applicable)
  • UI looks correct in different window sizes (if UI changes)
  • Calendar permissions work correctly (if calendar changes)
  • No crashes or memory leaks

Documentation

  • Updated CHANGELOG.md under [Unreleased]
  • Updated README.md (if needed)
  • Added code comments for complex logic

Additional Notes

  • The popover is anchored near the top of the view (22% offset) so suggestion list grows downward only
  • Calendar list sorts non-session calendars first (alphabetically), then work/side/deep calendars
  • Esc dismisses the popover; clicking the dimmed background also dismisses

Checklist

  • My code follows the project's coding standards
  • I have tested my changes thoroughly
  • My changes generate no new warnings
  • If adding new files, I have updated project.pbxproj

Double-click on free space in the left half of the timeline to create
calendar events directly. Features Spotlight-like autocomplete from
recently created events, calendar name matching in suggestions,
live duration lookup from EventKit, and full undo/redo support.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@kibermaks kibermaks merged commit ce6b9be into main Apr 9, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant